package com.orphan.audit.controller;


import com.orphan.audit.po.PromotionAudit;
import com.orphan.audit.po.PromotionCommodity;
import com.orphan.audit.service.IPromotionAuditService;
import com.orphan.audit.service.IPromotionCommodityService;
import com.orphan.util.dto.PromotionGoodsDto;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author yichen
 * @since 2021-07-14
 */
@RestController
@RequestMapping("/promotion-commodity")
public class PromotionCommodityController {
    @Autowired
    IPromotionCommodityService promotionCommodityService;
    @Autowired
    RabbitTemplate rabbitTemplate;
    @GetMapping("getPromotionGoods")
    private List<PromotionCommodity> getAll(){
        List<PromotionCommodity>promotionAudits = promotionCommodityService.getAll();
        System.out.println("promotionAudits = " + promotionAudits);
        return promotionAudits;
    }

}
